import javax.swing.*;
import java.awt.*;

public class Transparente extends JComponent {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private Image background;

	public Transparente(JFrame frame) {
		updateBackground();
	}

	public void updateBackground() {
		try {
			Robot robot = new Robot();
			Toolkit tk = Toolkit.getDefaultToolkit();
			Dimension dim = tk.getScreenSize();
			background = robot.createScreenCapture(new Rectangle(0, 0,
					(int) dim.getWidth(), (int) dim.getHeight()));
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}

	public void paintComponent(Graphics g) {
		Point pos = this.getLocationOnScreen();
		Point offset = new Point(-pos.x, -pos.y);
		g.drawImage(background, offset.x, offset.y, null);

	}

	public static void main(String[] args) {
		JFrame frame = new JFrame("Transparente");

		Transparente bg = new Transparente(frame);
		bg.setLayout(new BorderLayout());
		frame.getContentPane().add("Center", bg);

		frame.setSize(600, 600);
		frame.setVisible(true);

	}
}